import React from 'react';
// @ts-ignore
import styles from './index.scss'

export interface PropsInterface<T> {
  models: Array<T>,
  cell: (model: T) => JSX.Element,
}

export default function<T>(props: PropsInterface<T>) {

  return <ul className={ styles['com-table-view'] }>
    {
      props.models.map((model: T) => {
        return props.cell(model)
      })
    }
  </ul>
}
